home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 December
/
PCWorld_2006-12_cd.bin
/
v cisle
/
pcwmy
/
pcwMyfiles.exe
/
pcwMyfiles.HTA
Wrap
Text File
|
2006-10-20
|
5KB
|
90 lines
<HTML><!--
Author:
Copyright (C) 2003 David G. Wolski (admi@india.com)
Licence:
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
http://www.gnu.org/copyleft/gpl.html
Requirements:
Microsoft Windows 98/ME/2000/XP, IE 5.0, 5.5, 6.0
-->
<HEAD>
<TITLE>Skript PC-WORLDu: ┌prava slo₧ky Dokumenty</TITLE>
<HTA:APPLICATION ID="pcwMyfiles" APPLICATIONNAME="pcwMyfiles" BORDER = "normal" CAPTION = "yes" SHOWINTASKBAR = "yes" SINGLEINSTANCE = "yes" SYSMENU = "yes" WINDOWSTATE = "normal" SCROLL = "no" SCROLLFLAT = "no" VERSION = "1.0" INNERBORDER = "no" SELECTION = "no" MAXIMIZEBUTTON = "no" MINIMIZEBUTTON = "no" NAVIGABLE = "yes" CONTEXTMENU = "no" BORDERSTYLE = "normal" ICON="idg.ico"/>
<STYLE type="text/css">
body {font-family:Tahoma,Verdana,Arial,Geneva;font-size:14;background-color:Buttonface;}
table {font-family:Tahoma,Verdana,Arial,Geneva;font-size:14;}
</STYLE>
</HEAD>
<SCRIPT language="JScript">
//shell object
var wshShell = new ActiveXObject("WScript.Shell");
var strpersonal = "";
var strmypictures = "";
var strmymusic = "";
var strmyvideos = "";
function main() {
//read paths from registry
try {
strpersonal = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Personal");
strmypictures = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Pictures");
strmymusic = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Music");
strmyvideos = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Video");
}
catch(error){}
//if a variable is empty, default to the usual path
if (strmypictures == "") { strmypictures = strpersonal +"\\Eigene Bilder"; }
if (strmyvideos == "") { strmyvideos = strpersonal +"\\Eigene Videos"; }
if (strmymusic == "") { strmymusic = strpersonal +"\\Eigene Musik"; }
MyMusic.value = strmymusic;
MyVideos.value = strmyvideos;
MyPictures.value = strmypictures;
}
function save() {
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\My Pictures",MyPictures.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\My Music",MyMusic.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\My Video",MyVideos.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Pictures",MyPictures.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Music",MyMusic.value,"REG_SZ");
wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\My Video",MyVideos.value,"REG_SZ");
alert("─nderungen in die Registry ⁿbernommen");
//update window's content
main();
}
function browse(inputname) {
var objShell = new ActiveXObject("Shell.Application");
var ssfWINDOWS = 36;
var objFolder;
objFolder = objShell.BrowseForFolder(0, "WΣhlen Sie einen Ordner aus", 17);
if (objFolder != null) {
//this statement returns the selected folder as a value for 'inputname'
document.all.item(inputname).value = objFolder.items().item().Path;
}
}
</SCRIPT>
<BODY scroll=no onload="javascript:window.resizeTo(630, 200);main();">
<B>Obrßzky:</B><BR>
<INPUT type=Text ID="MyPictures" Name="MyPictures" size=78>
<INPUT Type=Button Value="Vybrat" onclick="browse('MyPictures')">
<BR><B>Hudba:</B><BR>
<INPUT type=Text ID="MyMusic" size=78>
<INPUT Type=Button Value="Vybrat" onclick="browse('MyMusic')">
<BR><B>Filmy:</B><BR>
<INPUT type=Text ID="MyVideos" size=78>
<INPUT Type=Button Value="Vybrat" onclick="browse('MyVideos')">
<INPUT Type=Button Value="Potvrdit" onclick="save()">
<INPUT Type=Button Value="Konec" onclick="javascript:window.close();">
</BODY>
</HTML>